import request from "@/utils/request.js"

/* 获取小区信息列表 */
export function listPlot(params){
    return request({
        url:'/plot/list',
        method:'GET',
        params,
    })
}

/* 根据id获取小区详情 */
export function listPlotId(plotId){
    return request({
        url:`/plot/dtl/${plotId}`,
        method:'GET',
       
        
    })
}

/*获取小区省市区信息 */
export function listArea(params){
     return request({
        url:'/area',
        method:'GET',
        params,
    })
}

/*添加小区信息 */
export function addPlot(data){
    return request({
        url:'/plot',
        method:'POST',
        data,
    })
}

/*编辑小区信息 */
export function editPlot(data){
    return request({
         url:'/plot',
         method:'PUT',
         data,
    })
   
}

/*删除小区信息 */
export function deletePlot(plotIds){
    return request({
        url:`/plot/${plotIds}`,
         method:'DELETE',
    })
}
